export default [
    {
        path: '/',
        component: () => import('@/view/index.vue'),
        name: 'layout',
        meta: { requireAuth: true },
        children: [
            {
                path: '',
                component: () => import('@/view/home/index.vue'),
                name: 'home',
                meta: { requireAuth: true }
            },
            {
                path: '/attractions',
                component: () => import('@/view/attractions/index.vue'),
                name: 'attractions',
                meta: { requireAuth: true }
            },
            {
                path: '/attractions/:id',
                component: () => import('@/view/attractions/detail.vue'),
                name: 'attractionDetail',
                meta: { requireAuth: true, hideHeader: true }
            },
            {
                path: '/guides',
                component: () => import('@/view/guides/index.vue'),
                name: 'guides',
                meta: { requireAuth: true }
            },
            {
                path: '/guides/write',
                component: () => import('@/view/guides/write.vue'),
                name: 'guideWrite',
                meta: { requireAuth: true, hideHeader: true }
            },
            {
                path: '/guides/:id',
                component: () => import('@/view/guides/detail.vue'),
                name: 'guideDetail',
                meta: { requireAuth: true, hideHeader: true }
            },
            {
                path: '/community',
                component: () => import('@/view/community/index.vue'),
                name: 'community',
                meta: { requireAuth: true }
            },
            {
                path: '/community/publish',
                component: () => import('@/view/community/publish.vue'),
                name: 'communityPublish',
                meta: { requireAuth: true, hideHeader: true }
            },
            {
                path: '/community/:id',
                component: () => import('@/view/community/detail.vue'),
                name: 'communityDetail',
                meta: { requireAuth: true, hideHeader: true }
            },
            {
                path: '/user/profile/:id?',
                component: () => import('@/view/user/profile.vue'),
                name: 'userProfile',
                meta: { requireAuth: true, hideHeader: true }
            },
            {
                path: '/user',
                component: () => import('@/view/user/index.vue'),
                name: 'user',
                meta: { requireAuth: true },
                redirect: '/user/settings',
                children: [
                    {
                        path: 'settings',
                        component: () => import('@/view/user/settings.vue'),
                        name: 'userSettings',
                        meta: { requireAuth: true }
                    },
                    {
                        path: 'orders',
                        component: () => import('@/view/user/orders.vue'),
                        name: 'userOrders',
                        meta: { requireAuth: true }
                    }
                ]
            },
            {
                path: '/order/create',
                component: () => import('@/view/order/create.vue'),
                name: 'orderCreate',
                meta: { requireAuth: true, hideHeader: true }
            }
        ]
    },
    {
        path: '/login',
        component: () => import('@/view/login/index.vue'),
        name: 'login'
    }
]
